#include "BinaryTreeNode.h"


int main()
{
    BTNode* node1 = BuyNode(1);
    BTNode* node2 = BuyNode(2);
    BTNode* node3 = BuyNode(4);
    BTNode* node4 = BuyNode(3);
    BTNode* node5 = BuyNode(5);
    BTNode* node6 = BuyNode(6);
    node1->_left = node2;
    node1->_right = node3;
    node2->_left = node4;   
    node3->_left = node5;
    node3->_right = node6;

    PrevOrder(node1);
    printf("\n");
    InOrder(node1);
    printf("\n");
    PostOrder(node1);
    printf("\n");

    // printf("%ld\n",NodeSize(node1));

    // printf("%ld\n",LeafNodeSize(node1));

    // printf("%ld\n",Height(node1));

    printf("%ld\n",KSize(node1,1));
    printf("%ld\n",KSize(node1,2));
    printf("%ld\n",KSize(node1,3));

    BTNode* find = FindK(node1,1);
    if(find == NULL)
    {
        printf("NULL\n");

    }
    else
    {
        printf("val = %d\n",find->_data);
    }
    return 0;
}
